package com.oop;

public class Test6 {
    public static void main(String[] args) {
        F f = new F();
        int ret=f.factorial(3);
        System.out.println(ret);

    }
}

class F{
    public int factorial(int n){
        if(n==1){
            return 1;
        }
        return n*factorial(n-1);
    }
}
